/*
 Navicat Premium Data Transfer

 Source Server         : localhost_postgres
 Source Server Type    : PostgreSQL
 Source Server Version : 140002
 Source Host           : localhost:5432
 Source Catalog        : yc
 Source Schema         : public

 Target Server Type    : PostgreSQL
 Target Server Version : 140002
 File Encoding         : 65001

 Date: 03/04/2022 15:10:49
*/


-- ----------------------------
-- Table structure for yc_dept
-- ----------------------------
DROP TABLE IF EXISTS "public"."yc_dept";
CREATE TABLE "public"."yc_dept" (
  "id" int8 NOT NULL,
  "create_by" int8 NOT NULL,
  "create_time" timestamp(6) NOT NULL,
  "deleted" int2 NOT NULL,
  "status" int2 NOT NULL,
  "name" varchar(50) COLLATE "pg_catalog"."default",
  "parent_id" int8
)
;
ALTER TABLE "public"."yc_dept" OWNER TO "postgres";
COMMENT ON COLUMN "public"."yc_dept"."create_by" IS '创建人';
COMMENT ON COLUMN "public"."yc_dept"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."yc_dept"."deleted" IS '删除?';
COMMENT ON COLUMN "public"."yc_dept"."status" IS '状态';
COMMENT ON COLUMN "public"."yc_dept"."name" IS '部门名字';
COMMENT ON COLUMN "public"."yc_dept"."parent_id" IS '父级部门id';
COMMENT ON TABLE "public"."yc_dept" IS '后台部门表';

-- ----------------------------
-- Records of yc_dept
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for yc_dict
-- ----------------------------
DROP TABLE IF EXISTS "public"."yc_dict";
CREATE TABLE "public"."yc_dict" (
  "id" int8 NOT NULL,
  "create_by" int8 NOT NULL,
  "create_time" timestamp(6) NOT NULL,
  "deleted" int2 NOT NULL,
  "status" int2 NOT NULL,
  "name" varchar(20) COLLATE "pg_catalog"."default" NOT NULL,
  "description" varchar(20) COLLATE "pg_catalog"."default",
  "type" int2 NOT NULL
)
;
ALTER TABLE "public"."yc_dict" OWNER TO "postgres";
COMMENT ON COLUMN "public"."yc_dict"."create_by" IS '创建人';
COMMENT ON COLUMN "public"."yc_dict"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."yc_dict"."deleted" IS '删除?';
COMMENT ON COLUMN "public"."yc_dict"."status" IS '状态';
COMMENT ON COLUMN "public"."yc_dict"."name" IS '字典名字';
COMMENT ON COLUMN "public"."yc_dict"."description" IS '描述';
COMMENT ON COLUMN "public"."yc_dict"."type" IS '字典类型1->数字;2->字符串';
COMMENT ON TABLE "public"."yc_dict" IS '后台字典表';

-- ----------------------------
-- Records of yc_dict
-- ----------------------------
BEGIN;
INSERT INTO "public"."yc_dict" ("id", "create_by", "create_time", "deleted", "status", "name", "description", "type") VALUES (1452155720433696, 1451979198955552, '2022-03-20 22:59:32', 0, 1, 'normal_status', '通用状态', 1);
INSERT INTO "public"."yc_dict" ("id", "create_by", "create_time", "deleted", "status", "name", "description", "type") VALUES (1452159925223456, 1451979198955552, '2022-03-20 22:59:39', 0, 1, 'sex_type', '性别', 1);
COMMIT;

-- ----------------------------
-- Table structure for yc_dict_detail
-- ----------------------------
DROP TABLE IF EXISTS "public"."yc_dict_detail";
CREATE TABLE "public"."yc_dict_detail" (
  "id" int8 NOT NULL,
  "create_by" int8 NOT NULL,
  "create_time" timestamp(6) NOT NULL,
  "deleted" int2 NOT NULL,
  "status" int2 NOT NULL,
  "label" varchar(20) COLLATE "pg_catalog"."default" NOT NULL,
  "value" varchar(20) COLLATE "pg_catalog"."default" NOT NULL,
  "dict_id" int8 NOT NULL
)
;
ALTER TABLE "public"."yc_dict_detail" OWNER TO "postgres";
COMMENT ON COLUMN "public"."yc_dict_detail"."create_by" IS '创建人';
COMMENT ON COLUMN "public"."yc_dict_detail"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."yc_dict_detail"."deleted" IS '删除?';
COMMENT ON COLUMN "public"."yc_dict_detail"."status" IS '状态';
COMMENT ON COLUMN "public"."yc_dict_detail"."label" IS '标签(多语言)';
COMMENT ON COLUMN "public"."yc_dict_detail"."value" IS '值';
COMMENT ON COLUMN "public"."yc_dict_detail"."dict_id" IS '字典id';
COMMENT ON TABLE "public"."yc_dict_detail" IS '后台字典详情表';

-- ----------------------------
-- Records of yc_dict_detail
-- ----------------------------
BEGIN;
INSERT INTO "public"."yc_dict_detail" ("id", "create_by", "create_time", "deleted", "status", "label", "value", "dict_id") VALUES (1452155766571040, 1451979198955552, '2022-03-20 23:10:02', 0, 1, '正常', '1', 1452155720433696);
INSERT INTO "public"."yc_dict_detail" ("id", "create_by", "create_time", "deleted", "status", "label", "value", "dict_id") VALUES (1452155789639712, 1451979198955552, '2022-03-20 23:10:06', 0, 1, '禁用', '0', 1452155720433696);
INSERT INTO "public"."yc_dict_detail" ("id", "create_by", "create_time", "deleted", "status", "label", "value", "dict_id") VALUES (1452159948292128, 1451979198955552, '2022-03-20 23:10:10', 0, 1, '男', '1', 1452159925223456);
INSERT INTO "public"."yc_dict_detail" ("id", "create_by", "create_time", "deleted", "status", "label", "value", "dict_id") VALUES (1452159979749408, 1451979198955552, '2022-03-20 23:10:13', 0, 1, '女', '0', 1452159925223456);
INSERT INTO "public"."yc_dict_detail" ("id", "create_by", "create_time", "deleted", "status", "label", "value", "dict_id") VALUES (1452160011206688, 1451979198955552, '2022-03-20 23:10:15', 0, 1, '中性', '-1', 1452159925223456);
COMMIT;

-- ----------------------------
-- Table structure for yc_menu
-- ----------------------------
DROP TABLE IF EXISTS "public"."yc_menu";
CREATE TABLE "public"."yc_menu" (
  "id" int8 NOT NULL,
  "create_by" int8 NOT NULL,
  "create_time" timestamp(6) NOT NULL,
  "deleted" int2 NOT NULL,
  "status" int2 NOT NULL,
  "sort" int4,
  "name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "parent_id" int8,
  "is_link" int2,
  "is_cache" int2,
  "is_auth" int2,
  "is_visible" int2,
  "permission" varchar(50) COLLATE "pg_catalog"."default",
  "type" int2,
  "icon" varchar(50) COLLATE "pg_catalog"."default",
  "path" varchar(100) COLLATE "pg_catalog"."default",
  "component_name" varchar(255) COLLATE "pg_catalog"."default",
  "component_path" varchar(255) COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "public"."yc_menu" OWNER TO "postgres";
COMMENT ON COLUMN "public"."yc_menu"."create_by" IS '创建人';
COMMENT ON COLUMN "public"."yc_menu"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."yc_menu"."deleted" IS '删除?';
COMMENT ON COLUMN "public"."yc_menu"."status" IS '状态';
COMMENT ON COLUMN "public"."yc_menu"."sort" IS '排序';
COMMENT ON COLUMN "public"."yc_menu"."name" IS '标题';
COMMENT ON COLUMN "public"."yc_menu"."parent_id" IS '父级菜单';
COMMENT ON COLUMN "public"."yc_menu"."is_link" IS '外链?';
COMMENT ON COLUMN "public"."yc_menu"."is_cache" IS '缓存？';
COMMENT ON COLUMN "public"."yc_menu"."is_auth" IS '身份验证？';
COMMENT ON COLUMN "public"."yc_menu"."is_visible" IS '可见?';
COMMENT ON COLUMN "public"."yc_menu"."permission" IS '权限';
COMMENT ON COLUMN "public"."yc_menu"."type" IS '类型;1->菜单；2->按钮';
COMMENT ON COLUMN "public"."yc_menu"."icon" IS '图标';
COMMENT ON COLUMN "public"."yc_menu"."path" IS '地址';
COMMENT ON COLUMN "public"."yc_menu"."component_name" IS '组件名字';
COMMENT ON COLUMN "public"."yc_menu"."component_path" IS '组件地址';
COMMENT ON TABLE "public"."yc_menu" IS '后台菜单表';

-- ----------------------------
-- Records of yc_menu
-- ----------------------------
BEGIN;
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1381901698859040, 1372440831721504, '2022-03-20 23:19:54', 0, 1, 0, '账户管理', 1381837096091680, 0, 1, 0, 1, NULL, 1, 'folder-o', 'management/user', 'user', 'management/user');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1382031753740320, 1372440831721504, '2022-03-20 23:20:02', 0, 1, 2, '菜单管理', 1381837096091680, 0, 1, 0, 1, NULL, 1, 'folder-o', 'management/menu', 'menu', 'management/menu');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1382033504862240, 1372440831721504, '2022-03-20 23:20:05', 0, 1, 0, '修改用户', 1381901698859040, 0, 1, 0, 1, 'management:user:update', 2, 'folder-o', NULL, NULL, NULL);
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1382255767322656, 1372440831721504, '2022-03-20 23:20:07', 0, 1, 0, '新增用户', 1381901698859040, 0, 1, 0, 1, 'management:user:add', 2, 'folder-o', NULL, NULL, NULL);
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1384442530627616, 1372440831721504, '2022-03-20 23:20:09', 0, 1, 1, '角色管理', 1381837096091680, 0, 1, 0, 1, '', 1, 'folder-o', 'management/role', 'role', 'management/role');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1384445737173024, 1372440831721504, '2022-03-20 23:20:12', 0, 1, 3, '部门管理', 1381837096091680, 0, 1, 1, 1, '', 1, 'folder-o', 'management/dept', 'dept', 'management/dept');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1384445795893280, 1372440831721504, '2022-03-20 23:20:15', 0, 1, 4, '岗位管理', 1381837096091680, 0, 1, 1, 1, '', 1, 'folder-o', 'management/post', 'post', 'management/post');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1384445848322080, 1372440831721504, '2022-03-20 23:20:18', 0, 1, 5, '字典管理', 1381837096091680, 0, 1, 1, 1, '', 1, 'folder-o', 'management/dict', 'dict', 'management/dict');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1384557121110048, 1372440831721504, '2022-03-20 23:20:24', 0, 1, 0, '删除用户', 1381901698859040, 0, 1, 1, 1, 'management:user:delete', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1384601371017248, 1372440831721504, '2022-03-20 23:20:26', 0, 1, 0, '新增角色', 1384442530627616, 0, 1, 1, 1, 'management:role:add', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1384601436028960, 1372440831721504, '2022-03-20 23:20:29', 0, 1, 0, '修改角色', 1384442530627616, 0, 1, 1, 1, 'management:role:update', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1384601477972000, 1372440831721504, '2022-03-20 23:20:31', 0, 1, 0, '删除角色', 1384442530627616, 0, 1, 1, 1, 'management:role:delete', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1384601536692256, 1372440831721504, '2022-03-20 23:20:34', 0, 1, 0, '新增菜单', 1382031753740320, 0, 1, 1, 1, 'management:menu:add', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1384601587023904, 1372440831721504, '2022-03-20 23:20:38', 0, 1, 0, '修改菜单', 1382031753740320, 0, 1, 1, 1, 'management:menu:update', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1384601624772640, 1372440831721504, '2022-03-20 23:20:41', 0, 1, 0, '删除菜单', 1382031753740320, 0, 1, 1, 1, 'management:menu:delete', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1384601662521376, 1372440831721504, '2022-03-20 23:20:44', 0, 1, 0, '新增部门', 1384445737173024, 0, 1, 1, 1, 'management:dept:add', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1384601708658720, 1372440831721504, '2022-03-20 23:20:46', 0, 1, 0, '修改部门', 1384445737173024, 0, 1, 1, 1, 'management:dept:update', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1384601756893216, 1372440831721504, '2022-03-20 23:20:49', 0, 1, 0, '删除部门', 1384445737173024, 0, 1, 1, 1, 'management:dept:delete', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1384601815613472, 1372440831721504, '2022-03-20 23:20:53', 0, 1, 0, '新增岗位', 1384445795893280, 0, 1, 1, 1, 'management:post:add', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1384601847070752, 1372440831721504, '2022-03-20 23:20:55', 0, 1, 0, '修改岗位', 1384445795893280, 0, 1, 1, 1, 'management:post:update', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1384601878528032, 1372440831721504, '2022-03-20 23:20:58', 0, 1, 0, '删除岗位', 1384445795893280, 0, 1, 1, 1, 'management:post:delete', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1384601928859680, 1372440831721504, '2022-03-20 23:21:02', 0, 1, 0, '新增字典', 1384445848322080, 0, 1, 1, 1, 'management:dict:add', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1384601979191328, 1372440831721504, '2022-03-20 23:21:09', 0, 1, 0, '修改字典', 1384445848322080, 0, 1, 1, 1, 'management:dict:update', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1384602021134368, 1372440831721504, '2022-03-20 23:21:13', 0, 1, 0, '删除字典', 1384445848322080, 0, 1, 1, 1, 'management:dict:delete', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1381837096091680, 1372440831721504, '2022-03-20 23:19:51', 0, 1, 0, '系统管理', 0, 0, 0, 1, 1, NULL, 1, 'assistive-listening-systems', 'management', 'management', 'management');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1472790836281376, 1451979198955552, '2022-04-03 14:09:57.455884', 0, 1, 0, '查询用户', 1381901698859040, 0, 1, 1, 1, 'management:user:query', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1472790892904480, 1451979198955552, '2022-04-03 14:10:24.520295', 0, 1, 0, '查询角色', 1384442530627616, 0, 1, 1, 1, 'management:role:query', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1472790976790560, 1451979198955552, '2022-04-03 14:11:04.81094', 0, 1, 0, '查询菜单', 1382031753740320, 0, 1, 1, 1, 'management:menu:query', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1472791022927904, 1451979198955552, '2022-04-03 14:11:26.921354', 0, 1, 0, '查询部门', 1384445737173024, 0, 1, 1, 1, 'management:dept:query', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1472791062773792, 1451979198955552, '2022-04-03 14:11:45.663475', 0, 1, 0, '查询岗位', 1384445795893280, 0, 1, 1, 1, 'management:post:query', 2, 'folder-o', '', '', '');
INSERT INTO "public"."yc_menu" ("id", "create_by", "create_time", "deleted", "status", "sort", "name", "parent_id", "is_link", "is_cache", "is_auth", "is_visible", "permission", "type", "icon", "path", "component_name", "component_path") VALUES (1472791104716832, 1451979198955552, '2022-04-03 14:12:05.986348', 0, 1, 0, '查询字典', 1384445848322080, 0, 1, 1, 1, 'management:dict:query', 2, 'folder-o', '', '', '');
COMMIT;

-- ----------------------------
-- Table structure for yc_post
-- ----------------------------
DROP TABLE IF EXISTS "public"."yc_post";
CREATE TABLE "public"."yc_post" (
  "id" int8 NOT NULL,
  "create_by" int8 NOT NULL,
  "create_time" timestamp(6) NOT NULL,
  "deleted" int2 NOT NULL,
  "status" int2 NOT NULL,
  "name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL
)
;
ALTER TABLE "public"."yc_post" OWNER TO "postgres";
COMMENT ON COLUMN "public"."yc_post"."create_by" IS '创建人';
COMMENT ON COLUMN "public"."yc_post"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."yc_post"."deleted" IS '删除?';
COMMENT ON COLUMN "public"."yc_post"."status" IS '状态';
COMMENT ON COLUMN "public"."yc_post"."name" IS '岗位名字';
COMMENT ON TABLE "public"."yc_post" IS '后台岗位表';

-- ----------------------------
-- Records of yc_post
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for yc_role
-- ----------------------------
DROP TABLE IF EXISTS "public"."yc_role";
CREATE TABLE "public"."yc_role" (
  "id" int8 NOT NULL,
  "create_by" int8 NOT NULL,
  "create_time" timestamp(6) NOT NULL,
  "deleted" int2 NOT NULL,
  "status" int2 NOT NULL,
  "name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
  "remark" varchar(255) COLLATE "pg_catalog"."default",
  "permission" varchar(50) COLLATE "pg_catalog"."default"
)
;
ALTER TABLE "public"."yc_role" OWNER TO "postgres";
COMMENT ON COLUMN "public"."yc_role"."create_by" IS '创建人';
COMMENT ON COLUMN "public"."yc_role"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."yc_role"."deleted" IS '删除?';
COMMENT ON COLUMN "public"."yc_role"."status" IS '状态';
COMMENT ON COLUMN "public"."yc_role"."name" IS '名字';
COMMENT ON COLUMN "public"."yc_role"."remark" IS '备注';
COMMENT ON COLUMN "public"."yc_role"."permission" IS '权限';
COMMENT ON TABLE "public"."yc_role" IS '后台角色表';

-- ----------------------------
-- Records of yc_role
-- ----------------------------
BEGIN;
INSERT INTO "public"."yc_role" ("id", "create_by", "create_time", "deleted", "status", "name", "remark", "permission") VALUES (1382244191043616, 1372440831721504, '2022-03-20 23:23:13', 0, 1, '超级管理员', '超级管理员', 'administrator');
COMMIT;

-- ----------------------------
-- Table structure for yc_role_menu_relation
-- ----------------------------
DROP TABLE IF EXISTS "public"."yc_role_menu_relation";
CREATE TABLE "public"."yc_role_menu_relation" (
  "id" int8 NOT NULL,
  "create_by" int8 NOT NULL,
  "create_time" timestamp(6) NOT NULL,
  "deleted" int2 NOT NULL,
  "status" int2 NOT NULL,
  "role_id" int8 NOT NULL,
  "menu_id" int8 NOT NULL
)
;
ALTER TABLE "public"."yc_role_menu_relation" OWNER TO "postgres";
COMMENT ON COLUMN "public"."yc_role_menu_relation"."create_by" IS '创建人';
COMMENT ON COLUMN "public"."yc_role_menu_relation"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."yc_role_menu_relation"."deleted" IS '删除?';
COMMENT ON COLUMN "public"."yc_role_menu_relation"."status" IS '状态';
COMMENT ON COLUMN "public"."yc_role_menu_relation"."role_id" IS '角色id';
COMMENT ON COLUMN "public"."yc_role_menu_relation"."menu_id" IS '菜单id';
COMMENT ON TABLE "public"."yc_role_menu_relation" IS '后台角色和菜单关系表';

-- ----------------------------
-- Records of yc_role_menu_relation
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for yc_user
-- ----------------------------
DROP TABLE IF EXISTS "public"."yc_user";
CREATE TABLE "public"."yc_user" (
  "id" int8 NOT NULL,
  "create_by" int8,
  "create_time" timestamp(6) NOT NULL,
  "deleted" int2 NOT NULL,
  "status" int2 NOT NULL,
  "username" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "password" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
  "avatar" varchar(255) COLLATE "pg_catalog"."default",
  "email" varchar(50) COLLATE "pg_catalog"."default",
  "nickname" varchar(50) COLLATE "pg_catalog"."default",
  "sex" int2,
  "phone" varchar(20) COLLATE "pg_catalog"."default",
  "last_login_time" timestamp(6),
  "remark" varchar(255) COLLATE "pg_catalog"."default",
  "dept_id" int8,
  "level" int2,
  "age" int4,
  "type" int4 NOT NULL DEFAULT 1,
  "post_id" int8
)
;
ALTER TABLE "public"."yc_user" OWNER TO "postgres";
COMMENT ON COLUMN "public"."yc_user"."create_by" IS '创建人';
COMMENT ON COLUMN "public"."yc_user"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."yc_user"."deleted" IS '删除?';
COMMENT ON COLUMN "public"."yc_user"."status" IS '状态';
COMMENT ON COLUMN "public"."yc_user"."username" IS '用户名';
COMMENT ON COLUMN "public"."yc_user"."password" IS '密码';
COMMENT ON COLUMN "public"."yc_user"."avatar" IS '头像';
COMMENT ON COLUMN "public"."yc_user"."email" IS '邮箱';
COMMENT ON COLUMN "public"."yc_user"."nickname" IS '昵称';
COMMENT ON COLUMN "public"."yc_user"."sex" IS '性别；0->女；1->男；2->中性；-1->未知';
COMMENT ON COLUMN "public"."yc_user"."phone" IS '手机号码';
COMMENT ON COLUMN "public"."yc_user"."last_login_time" IS '最后登录时间';
COMMENT ON COLUMN "public"."yc_user"."remark" IS '备注';
COMMENT ON COLUMN "public"."yc_user"."dept_id" IS '部门id';
COMMENT ON COLUMN "public"."yc_user"."level" IS '级别';
COMMENT ON COLUMN "public"."yc_user"."age" IS '年龄';
COMMENT ON COLUMN "public"."yc_user"."type" IS '类型;1->后台系统用户';
COMMENT ON COLUMN "public"."yc_user"."post_id" IS '岗位id';
COMMENT ON TABLE "public"."yc_user" IS '后台用户表';

-- ----------------------------
-- Records of yc_user
-- ----------------------------
BEGIN;
INSERT INTO "public"."yc_user" ("id", "create_by", "create_time", "deleted", "status", "username", "password", "avatar", "email", "nickname", "sex", "phone", "last_login_time", "remark", "dept_id", "level", "age", "type", "post_id") VALUES (1451979198955552, NULL, '2022-03-20 23:24:46', 0, 1, 'administrator', '$2a$10$jEnld1lforEovATttc2RP.OWX7DrTnZTn5c6QF/ncF9GMnj0Zk0LC', '', '86377983@qq.com', '超级管理员', 1, '17003099022', '2022-04-03 14:04:37.164202', 'administrator', 1471702831726624, -1, 18, 1, 1471702137569312);
COMMIT;

-- ----------------------------
-- Table structure for yc_user_role_relation
-- ----------------------------
DROP TABLE IF EXISTS "public"."yc_user_role_relation";
CREATE TABLE "public"."yc_user_role_relation" (
  "id" int8 NOT NULL,
  "create_by" int8 NOT NULL,
  "create_time" timestamp(6) NOT NULL,
  "deleted" int2 NOT NULL,
  "status" int2 NOT NULL,
  "user_id" int8 NOT NULL,
  "role_id" int8 NOT NULL
)
;
ALTER TABLE "public"."yc_user_role_relation" OWNER TO "postgres";
COMMENT ON COLUMN "public"."yc_user_role_relation"."create_by" IS '创建人';
COMMENT ON COLUMN "public"."yc_user_role_relation"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."yc_user_role_relation"."deleted" IS '删除?';
COMMENT ON COLUMN "public"."yc_user_role_relation"."status" IS '状态';
COMMENT ON COLUMN "public"."yc_user_role_relation"."user_id" IS '用户id';
COMMENT ON COLUMN "public"."yc_user_role_relation"."role_id" IS '角色id';
COMMENT ON TABLE "public"."yc_user_role_relation" IS '后台用户和角色关系表';

-- ----------------------------
-- Records of yc_user_role_relation
-- ----------------------------
BEGIN;
INSERT INTO "public"."yc_user_role_relation" ("id", "create_by", "create_time", "deleted", "status", "user_id", "role_id") VALUES (1471702861086752, 1451979198955552, '2022-03-28 14:03:30.666009', 0, 1, 1451979198955552, 1382244191043616);
COMMIT;

-- ----------------------------
-- Indexes structure for table yc_dept
-- ----------------------------
CREATE UNIQUE INDEX "name" ON "public"."yc_dept" USING btree (
  "name" COLLATE "pg_catalog"."default" "pg_catalog"."text_ops" ASC NULLS LAST,
  "deleted" "pg_catalog"."int2_ops" ASC NULLS LAST
);
CREATE INDEX "pid" ON "public"."yc_dept" USING btree (
  "parent_id" "pg_catalog"."int8_ops" ASC NULLS LAST
);

-- ----------------------------
-- Primary Key structure for table yc_dept
-- ----------------------------
ALTER TABLE "public"."yc_dept" ADD CONSTRAINT "yc_dept_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table yc_dict
-- ----------------------------
ALTER TABLE "public"."yc_dict" ADD CONSTRAINT "yc_dict_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table yc_dict_detail
-- ----------------------------
ALTER TABLE "public"."yc_dict_detail" ADD CONSTRAINT "yc_dict_detail_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table yc_menu
-- ----------------------------
ALTER TABLE "public"."yc_menu" ADD CONSTRAINT "yc_menu_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table yc_post
-- ----------------------------
ALTER TABLE "public"."yc_post" ADD CONSTRAINT "yc_post_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table yc_role
-- ----------------------------
ALTER TABLE "public"."yc_role" ADD CONSTRAINT "yc_role_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table yc_role_menu_relation
-- ----------------------------
ALTER TABLE "public"."yc_role_menu_relation" ADD CONSTRAINT "yc_role_menu_relation_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table yc_user
-- ----------------------------
ALTER TABLE "public"."yc_user" ADD CONSTRAINT "yc_user_pkey" PRIMARY KEY ("id");

-- ----------------------------
-- Primary Key structure for table yc_user_role_relation
-- ----------------------------
ALTER TABLE "public"."yc_user_role_relation" ADD CONSTRAINT "yc_user_role_relation_pkey" PRIMARY KEY ("id");
